<?php
class InvitesController extends FacebookAppController {

	var $name = 'Invites';
	var $helpers = array('Html', 'Form');
	
	// Model
	var $uses = array('InvitesController');

	/** 
	 * Name: beforeFilter 
	 * Desc: Make sure users are logged into facebook 
	 */  
	function beforeFilter() {  
		$this->user = $this->facebook->require_login();  
	} 

	/**
	 * Show the form to invite friends to join this app
	 */
	function index() {
		Configure::write('debug', '0');

		$this->set('add_url', "http://www.facebook.com/add.php?api_key=$this->__fbApiKey&v=1.0");
		
		$this->set('selected_menu', "invites");
	}


	/**
	 * This page is called after an invite is sent to a user's friends
	 * @return 
	 */
	function sent() {
		Configure::write('debug', '0');

	}
	
}
?>
